package com.bw.module_detail.model.api

import com.bw.lib_net.BaseResponse
import com.bw.module_detail.model.entity.AgreeEntity
import com.bw.module_detail.model.entity.CommentEntity
import com.bw.module_detail.model.entity.DanMuEntity
import com.bw.module_detail.model.entity.VideoEntity
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Query

/**
 * @author ykj
 * @date 2025-10-22 08:18
 * @description
 */
interface DetailApi {
    //获得评论信息
    @GET("/comment/getCommentByUserId")
    suspend fun getCommentList(@Query("datatype") datatype:Int,@Query("itemid")itemid:String):BaseResponse<List<CommentEntity>>
    //发送评论
    @POST("/comment/publishComment")
    suspend fun publishComment(@Body body:CommentEntity):BaseResponse<CommentEntity>
    //获得视频列表
    @GET("/videosimple/getRecommendSimpleVideo")
    suspend fun getVideoList(@Query("page")page:Int,@Query("pagesize")pagesize:Int):BaseResponse<List<VideoEntity>>
    //点赞
    @PUT("/agree/agree")
    suspend fun agree(@Body response: BaseResponse<AgreeEntity>)
    //关注
    @POST("/focuse/focuse")
    suspend fun focuse(@Query("focuseUserid")userId:Int,@Query("focusedUserid")focusedUserid:Int):BaseResponse<Boolean>
    //取消关注
    @DELETE("/focuse/unFocuse")
    suspend fun unFocuse(@Query("focuseUserid")userId:Int,@Query("focusedUserid")focusedUserid:Int):BaseResponse<Boolean>
    //获得弹幕信息
    @GET("/bulletscreen/getBulletScreenInfo")
    suspend fun getBulletScreenInfo(@Query("datatype") datatype:Int,@Query("itemid") itemId:String):BaseResponse<List<DanMuEntity>>
    //发送弹幕
    @POST("/bulletscreen/publishBulletScreen")
    suspend fun publishBulletScreen(@Body body:RequestBody):BaseResponse<DanMuEntity>
    //修改用户金币
    @PUT("/account/modifyCoinAmount")
    suspend fun modifyCoinAmount(@Query("id") id:String,@Query("nm") nm:Int):BaseResponse<Boolean>
}